package 练习;

/**
 * @Author Mucd
 * @ClassName ArrSum
 * @Date 2020/12/12/012
 * @Specification Alibaba
 */
public class ArrSum {
    public static void main(String[] args) {
        int[] arr = {171, 72, 19, 16, 118, 51, 210, 7, 18};

        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            //能被2整除  个位和十位不能有7
            if (((i % 2) == 0) && ((arr[i] % 10) != 7) && (((arr[i] / 10) % 10) != 7)) {
                sum += arr[i];
                System.out.println(sum);
            }
        }
    }
}
